class Solution(object):
    def getRow(self, rowIndex):
        """
        :type rowIndex: int
        :rtype: List[int]
        """
        if rowIndex == 0:
            return [1]
        fenzi = 1
        fenmu = 1
        return_list = [1]
        for i in range(0, rowIndex):
            fenzi = fenzi * (rowIndex - i)
            fenmu = fenmu * (i + 1)
            return_list.append(fenzi // fenmu)
        return return_list

data = Solution()
rowIndex = 4
print(data.getRow(rowIndex))